package hc.j2me.ui;

import hc.core.ContextManager;
import hc.j2me.load.Mlet;

import javax.microedition.lcdui.game.Layer;
import javax.microedition.lcdui.game.LayerManager;

public class MletPressShortPanel extends PressShortPanel {

		public MletPressShortPanel(Mlet mlet, LayerManager lm, Layer overLayer, final int _blockWidth, final int userMouseSplitWidth, final int _16){
			super(_blockWidth, mlet, 2);
			
			final String[] imgURL = {
					"/hc/j2me/res/exit_" + _16 + ".png",
					"/hc/j2me/res/cancel_" + _16 + ".png"};

			buildShortSprite(lm, overLayer, _blockWidth, userMouseSplitWidth, _16, imgURL);
		}
		
		public int actionIconIdx(int idx){
			if(idx == 0){
				ContextManager.notifyShutdown();
				return HCCtrlGameCanvas.R_OK;
			}else if(idx == 1){
				//取消
				return HCCtrlGameCanvas.R_OK;
			}
			//自动忽略，取消
			return HCCtrlGameCanvas.R_CONTINUE;
		}
	}
